<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.saftalk.ui.UIUserResult" %>

<!doctype html>
<html lang="en" ng-app="saftalk">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Saftalk Application">
    <meta name="author" content="Saftalk">
    
    <title>Saftalk</title>

	<link rel="stylesheet" href="content/css/style.css?time=<%= new java.util.Date() %>">
    <link rel="stylesheet" href="content/css/bootstrap-rtl.min.css">
	<link rel="stylesheet" href="content/css/bootstrap-responsive-rtl.min.css">
	<link rel="stylesheet" href="content/css/rtl.css">
	
	<link rel="stylesheet" href="content/css/tinyscrollbar.css" type="text/css" media="screen"/>
	
	
    <script src="content/js/angular.min.js"></script>
    <script src="content/js/jquery-1.8.3.min.js"></script>
    <script src="content/js/app.js?time=<%= new java.util.Date() %>"></script>
    <script src="content/js/controllers.js?time=<%= new java.util.Date() %>"></script>
    <script src="content/js/bootstrap.js?time=<%= new java.util.Date() %>"></script>
    <script src="content/js/saftalk.js?time=<%= new java.util.Date() %>"></script>
    <script src="content/js/familyChat.js?time=<%= new java.util.Date() %>"></script>
    <script src="content/js/seniorChat.js?time=<%= new java.util.Date() %>"></script>
    <script src="content/js/image.js?time=<%= new java.util.Date() %>"></script>
    <script src="content/js/user.js?time=<%= new java.util.Date() %>"></script>
    <script src="content/js/settings.js?time=<%= new java.util.Date() %>"></script>
    <script src="content/js/jquery.bpopup-0.7.0.min.js"></script>
    <script src="content/js/fittext/jquery.fittext.js"></script>
    <script src="content/js/galleria/galleria-1.2.8.min.js"></script>
    <script src="content/js/jquery.touchslider.min.js"></script>
	<script src="content/js/jquery.flip.js"></script>
	

	<!--
		<script src="http://static.opentok.com/v1.1/js/TB.min.js" type="text/javascript" charset="utf-8"></script>
	-->
	
	<script src="https://swww.tokbox.com/webrtc/v2.0/js/TB.min.js" type="text/javascript" charset="utf-8"></script>

	<script src="content/js/jquery-ui-1.9.2.custom.min.js"></script>
	<script src="content/js/jquery.iframe-post-form.js"></script>
	<script src="content/js/videoChat.js?time=<%= new java.util.Date() %>"></script>
    <script type="text/javascript" src="content/js/jquery.tinyscrollbar.min.js"></script>
    <script>

    		<% 
		UIUserResult user = (UIUserResult) request.getSession().getAttribute("user"); 
		if (user != null) {
	%>
		
		globalAppParams.name = '<%= user.getName() %>';
		globalAppParams.channel= '<%= user.getChannel() %>';
		globalAppParams.userId='<%= user.getUserId() %>';
		globalAppParams.photoId='<%= user.getPhotoId() %>';
        globalAppParams.chatMode='<%= user.isSenior() ? 2 : 1 %>';
        globalAppParams.isAdmin = <%= user.isAdmin() %>;
        globalAppParams.fontSize = <%= user.getFontSize() %>;
        globalAppParams.keyboard = <%= user.isKeyboardEnabled() %>;
		
	<%
		}
		else{
			%>
            globalAppParams.userId='<%= 0%>';
        <%

		}
	%>
	$(function() {	
		Galleria.loadTheme('/content/js/galleria/themes/classic/galleria.classic.min.js');
	});
    </script>
    
</head>
<body ng-app="PubNubChat">
	
    <div pub-key="pub-8e474368-7add-4283-9b87-caf9efbcdedc" sub-key="sub-1ffec1f3-9463-11e1-9376-77819258e702" ssl="off" origin="pubsub.pubnub.com" id="pubnub"></div>
    <script src="content/js/pubnub-3.4.min.js"></script>

    <div class="appNgView" ng-view></div>

</body>
</html>
